package com.huaxia.day19;

public class Calcul {
    private int number1;
    private int number2;

    public Calcul() {

    }

    public Calcul(int number1, int number2) {
        this.number1 = number1;
        this.number2 = number2;
    }

    public int add() {
        return number1 + number2;
    }

    public int sub() {
        return number1 - number2;
    }

    public int multiplication() {
        return number2 * number1;
    }

    public int division() {
        return number1 / number2;
    }


    public static void main(String[] args) {
        Calcul calcul = new Calcul(100, 10);
        System.out.println(calcul.number1 + "+" + calcul.number2 + " = " + calcul.add());
        System.out.println(String.format("%s-%s = %s", calcul.number1, calcul.number2, calcul.sub()));
        System.out.println(String.format("%s*%s = %s", calcul.number1, calcul.number2, calcul.multiplication()));
        System.out.println(String.format("%s/%s = %s", calcul.number1, calcul.number2, calcul.division()));


    }
}
